﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ECCSystem
{
    public partial class frmReportsMain : Form
    {
        public frmReportsMain()
        {
            InitializeComponent();
        }

        private void btnCSR_Click(object sender, EventArgs e)
        {
            Form frmReports=new Reports.frmCSRReport();
            frmReports.ShowDialog();
        }

        private void btnCSRProductivity_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmCSRProductivityReport();
            frmReports.ShowDialog();
        }

        private void btnTeamProductivity_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmTeamProductivityReport();
            frmReports.ShowDialog();
        }

        private void btnCSRMailCategory_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmCSRMailCategoryReport();
            frmReports.ShowDialog();
        }

        private void btnTeamMailCategory_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmTeamMailCategoryReport();
            frmReports.ShowDialog();
        }

        private void btnSaleCommodity_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmSaleCommodityReport();
            frmReports.ShowDialog();
        }

        private void btnJapans_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmJapansReport();
            frmReports.ShowDialog();
        }

        private void btnExtras_Click(object sender, EventArgs e)
        {
            Form frmReports = new Reports.frmExtrasReport();
            frmReports.ShowDialog();
        }

        private void frmReportsMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form frmMain = new frmMain();
            frmMain.Show();
        }

		private void btnPersonalMailReport_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmPersonalMailReport();
			frmReports.ShowDialog();
		}

		private void btnMailCheck_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmMailCheckReport();
			frmReports.ShowDialog();
		}

		private void btnEfficiency_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmEfficiencyReport();
			frmReports.ShowDialog();
		}

		private void btnDetailMember_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmDetailMemberReport();
			frmReports.ShowDialog();
		}

		private void btnDetailManagement_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmDetailManagementReport();
			frmReports.ShowDialog();			
		}

		private void btnCategoryReport_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmCategoryReport();
			frmReports.ShowDialog();
		}

		private void btnOverTime_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmEfficiencyOverTimeReport();
			frmReports.ShowDialog();
		}

		private void btnAppointReport_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmPersonalAppointMailReport();
			frmReports.ShowDialog();
		}

		private void btnAppointEfficiency_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmAppointEfficiencyReport();
			frmReports.ShowDialog();
		}

		private void btnWorkMode_Click(object sender, EventArgs e)
		{
			Form frmReports = new Reports.frmWorkModeReport();
			frmReports.Show();
			
		}

        private void btn_MailRecieved_Click(object sender, EventArgs e)
        {
            frm_Ext_Report_MailRecieved _form = new frm_Ext_Report_MailRecieved();
            this.Hide();
            _form.ShowDialog();
            this.Show();
        }

        private void btn_OFFAnnotation_Click(object sender, EventArgs e)
        {
            frm_Ext_Report_OFFAnnotation _form = new frm_Ext_Report_OFFAnnotation();
            this.Hide();
            _form.ShowDialog();
            this.Show();
        }

		private void frmReportsMain_Load(object sender, EventArgs e)
		{
			if (BizRule.ClsCommon.gStrRight == "CSR")
			{
				btnCSRProductivity.Enabled = false;
				btnTeamProductivity.Enabled = false;
				btnPersonalMailReport.Enabled = false;
				btnTeamMailCategory.Enabled = false;
				btnEfficiency.Enabled = false;
				btnMailCheck.Enabled = false;

				btnCategoryReport.Enabled = false;
				btnAppointReport.Enabled = false;
				btnOverTime.Enabled = false;
				btnAppointEfficiency.Enabled = false;

				btnDetailManagement.Enabled = false;
				btnWorkMode.Enabled = false;
			}
		}


    }
}